// In C++, when you have a clss with an overload method, 
// and you then extend and override that method, you must 
// override all of the overloaded methods.
#include <iostream>

using namespace std;

class Base {
public:
    virtual void method(int i) {
        cout << "Method1" << endl;
    }

    virtual void method(int i, int j) {
        cout << "Method2" << endl;
    }
};

class Sub : public Base {
public:
    void method(int i) {
        cout << "Method3" << endl;
    }

    void method(int i, int j) {
        cout << "Method4" << endl;
    }
};

int main() {
    Sub s;
    s.method(1);
    s.method(1, 1);

    Base *b = &s;
    b->method(1);
    b->method(1, 1);

    return 0;
}

